package com.happle.gcmclient.utility;

import android.view.View;
import android.widget.AdapterView;
import android.widget.Toast;

import com.happle.gcmclient.BaseActivity;
import com.happle.gcmclient.MessageListActivity;

/**
 * Created by innaz on 18/11/13.
 */
public class CustomOnItemSelectedListener implements AdapterView.OnItemSelectedListener {
    public void onItemSelected(AdapterView<?> parent, View view, int pos,
                               long id) {
        if (pos == parent.getCount()-1)
        {
            //MessageListActivity MsgLst = new MessageListActivity();
            //MsgLst.showLngDialog();
        } else {
        Toast.makeText(parent.getContext(),
                "The message will be sent to somebody who speaks \n" + parent.getItemAtPosition(pos).toString(),
                Toast.LENGTH_LONG).show();
        }
    }

    @Override
    public void onNothingSelected(AdapterView<?> arg0) {
        // TODO Auto-generated method stub

    }

}
